/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package orgaoEmissor.classes;

import associados.classes.Associado;
import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Wolverine
 */
@Entity(name = "OrgaoEmissor")
@Table(name = "orgaoemissor")
public class OrgaoEmissor implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "idorgaoemissor")
    private int idorgaoemissor;
    @Column(name = "nome")
    private String nome;
    @OneToMany(mappedBy = "idorgaoemissor")
    private Collection<Associado> associados;

    public int getIdorgaoemissor() {
        return idorgaoemissor;
    }

    public void setIdorgaoemissor(int idorgaoemissor) {
        this.idorgaoemissor = idorgaoemissor;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }
}
